﻿@model TJBHJJ.Models.News
@{
    ViewBag.Title = "添加新闻";
}
<script type="text/javascript">
    $(function () {
        $("#tabs").tabs();
    });

    var editor;
    KindEditor.ready(function (K) {
        editor = K.create('#Content',
                    {
                        allowFileManager: true,
                        uploadJson: '/Manager/UploadImage'
                    });
    });
    //setTimeout("editor.show();", 50);


</script>
<div id="tabs">
    <ul>
        <li><a href="#tabs-1">编辑新闻</a></li>
    </ul>
    <div id="tabs-1">
        @using (Html.BeginForm("News", "Manager",FormMethod.Post))
        {
            @Html.ValidationSummary(true)
            <input type="hidden" id="cValue" name="cValue" />
            <table>
                <tr>
                    <td style="width: 100px">
                        新闻标题：
                    </td>
                    <td>@Html.EditorFor(model => model.Title)
                        @Html.ValidationMessageFor(model => model.Title)
                    </td>
                </tr>
                <tr>
                    <td>
                        新闻内容：
                    </td>
                    <td>@Html.TextAreaFor(model => model.Content, new { style = "width:700px;height:300px" })
                        @Html.ValidationMessageFor(model => model.Content)
                    </td>
                </tr>
                <tr>
                    <td>
                        作者：
                    </td>
                    <td>@Html.TextBoxFor(model => model.Author)
                        @Html.ValidationMessageFor(model => model.Author)
                    </td>
                </tr>
                <tr>
                    <td>
                        是否显示：
                    </td>
                    <td>@Html.EditorFor(model => model.IsDisplay)
                        @Html.ValidationMessageFor(model => model.IsDisplay)
                    </td>
                </tr>
            </table>
            <p>
                <input type="submit" value="添加" />
            </p>
            @Html.ActionLink("返回列表", "NewList")

        }
    </div>
</div>
